home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Tools⁄Additions / Mandlebrot / Mandlebrot Folder / AboutMandel.c next >
Text File  |  1990-05-07  |  4KB  |  127 lines

  1. /* *********************************************************************************
  2.      
  3.       FILE:            AboutMandel.c
  4.       
  5.      DESCRIPTION:    Puts up the About Mandelbrot Window & waits for mouse click.
  6.      
  7.      AUTHOR:        Bruce E. Gladstone
  8.      
  9.      Copyright © 1990 by Bruce E. Gladstone, All Rights Reserved.
  10.      
  11.      Revision History:
  12.      ============================================================
  13.      5/1/90    - Release to Compuserve
  14.      ============================================================
  15.      
  16.      COMMENTS:
  17.      
  18.      None. 
  19.  
  20.    ******************************************************************************** */        
  21.  
  22. #include <stdio.h> 
  23. #include <MacTypes.h> 
  24. #include <WindowMgr.h>
  25. #include <MenuMgr.h>
  26. #include <EventMgr.h>
  27. #include <ToolboxUtil.h> 
  28. #include <ControlMgr.h>
  29. #include <color.h>
  30. #include <colortoolbox.h>
  31. #include "Mandelbrot.h"
  32.  
  33.  
  34. /* ---------------------------- Global Variables ---------------------------------- */
  35.  
  36. extern int                colorQD;
  37. extern int                quitFlag;
  38. extern int                linearFlag;
  39. extern int                custPict;
  40. extern int                numColorBits;
  41. extern int                numColors, brushSize;
  42. extern int                limit;
  43. extern int                n;
  44. extern long                startTime, now;
  45. extern float            res;
  46. extern float            centx, centy;
  47. extern float            xmin, xmax, ymin, ymax;
  48. extern float            delx, dely;
  49.  
  50. /* ---------------------------- Global MacTypes ----------------------------------- */
  51.  
  52. extern Str255            str;
  53. extern CTabHandle        myColorHandle;
  54. extern RGBColor            aColor;
  55. extern Rect                myRect, dragRect;
  56. extern WindowPtr        aboutWindow;        
  57. extern MenuHandle        appleMenu, mandelMenu, editMenu, xMenu, yMenu, resMenu, timeMenu;
  58. extern WindowPtr        myWindow;
  59.  
  60. /* ---------------------------  Local Prototypes  --------------------------------- */
  61.  
  62. void aboutDialog ( void );
  63.  
  64.  
  65. /* --------------------------------------------------------------------------------
  66.     About Dialog -    put up about window (includes instructions),
  67.     wait for user to go away 5/01/90 beg
  68. ----------------------------------------------------------------------------------- */
  69. void
  70. aboutDialog ()
  71. {
  72.     GrafPtr        oldPort;
  73.     Rect        tempRect;
  74.     
  75.     GetPort ( &oldPort );
  76.     SetRect ( &tempRect, 30, 60, 482, 292 );
  77.     aboutWindow = NewWindow ( nil, &tempRect, '', TRUE, dBoxProc, 
  78.         (WindowPtr)-1, TRUE, 0 );
  79.     SetPort ( aboutWindow );
  80.     ForeColor ( redColor );
  81.     TextFont ( helvetica );
  82.     TextSize ( 14 );
  83.     MoveTo ( 8,30 );
  84.     DrawString ( "\pMandel by Dan Allen - January 1989" );
  85.     MoveTo ( 8,48 );
  86.     DrawString ( "\pModified by Bruce Gladstone - May 1990" );
  87.     TextFont ( courier );
  88.     ForeColor ( blueColor );
  89.     TextSize ( 10 );
  90.     MoveTo ( 8,67 );
  91.     DrawString ("\pVersion       - 1.1 built February 16, 1990 with Lightspeed C." );
  92.     MoveTo ( 8,79 );
  93.     DrawString ("\pFractals      -  Discovered by Benoit Mandelbrot." );
  94.     MoveTo ( 8,91 );
  95.     DrawString ("\pSoftware      -  Classic black and white or Color QuickDraw." );
  96.     MoveTo ( 8,103 );
  97.     DrawString ("\pHardware      -  Use a MC68881/2 for serious speedup." );
  98.     MoveTo ( 8,115 );
  99.     DrawString ("\pShift Click   -  Zooms in by a factor of two." );
  100.     MoveTo ( 8,127 );
  101.     DrawString ("\pOption Click  -  Zooms out by a factor of two." );
  102.     MoveTo ( 8,139 );
  103.     DrawString ("\pCmd Click     -  Cycles through 6 classic locations." );
  104.     MoveTo ( 8,151 );
  105.     DrawString ("\pClick         -  Moves center but not the magnification." ); 
  106.     MoveTo ( 8,163 );
  107.     DrawString ("\pCmd Opt Click -  Resets to a standard Mandelbrot view." );
  108.     MoveTo ( 8,175 );
  109.     DrawString ("\pMenu Bar      -  Shows coordinates of current screen center." );
  110.     MoveTo ( 8,187 );
  111.     DrawString ("\pLimits        -  Number of loops to determine a pixel's color." );
  112.     MoveTo ( 8,199 );
  113.     DrawString ("\pMod Colors    -  Repeats colors Modulo the colors available." );
  114.     MoveTo ( 8,211 );
  115.     DrawString ("\pLinear Colors -  Progression through the available colors." );
  116.     
  117.     while ( !Button ()) SystemTask();
  118.     DisposeWindow ( aboutWindow );
  119.     SetPort ( oldPort );
  120.     FlushEvents( mUpMask+mDownMask+activMask, 0 );
  121. } /*  aboutDialog ()  */
  122.  
  123. /* ===============================  EOF  ==========================================
  124.     Copyright © 1990 by Bruce E. Gladstone, All Rights Reserved.
  125.    ================================================================================ */
  126.  
  127.